import { instance } from "./request";


class request {
    get(url, data) {
        const options = {
            url,
            params: data,
            method: 'GET',
            headers: {
                contentType: 'application/json'
            }
        }
        return instance(options)
    }
    post(url, data) {
        const options = {
            url,
            data: data,
            method: 'POST',
            headers: {
                contentType: 'application/x-www-form-urlencoded'
            }
        }
        return instance(options)

    }
}

export default new request()